package com.guangzhi.weijianzhi.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Toast;

import com.guangzhi.weijianzhi.R;
import com.guangzhi.weijianzhi.view.sweetalert.SweetAlertDialog;
import com.guangzhi.weijianzhi.view.sweetalert.SweetAlertDialog.OnSweetClickListener;

public class MainActivity extends FragmentActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE); 

		setContentView(R.layout.activity_main);
		
		findViewById(R.id.button).setOnClickListener(new OnClickListener() {
//			new SweetAlertDialog(getActivity(),
//					SweetAlertDialog.NORMAL_TYPE).setTitleText("提示").showCancelButton(true).setConfirmClickListener(new OnSweetClickListener() {
//						
//						@Override
//						public void onClick(SweetAlertDialog sweetAlertDialog) {
//							// TODO Auto-generated method stub
//							Toast.makeText(getActivity(), "你好啊", 1).show();
//							sweetAlertDialog.dismiss();
//						}
//					})
//					.setContentText("您目前的收入尚未满足开启要求。加油...").show();
//			break;
//		case 7:
//			new SweetAlertDialog(getActivity(),
//					SweetAlertDialog.NORMAL_TYPE).setTitleText("提示")
//					.setContentText("您目前的收入尚未满足开启要求。加油...").show();
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				new SweetAlertDialog(MainActivity.this,
						SweetAlertDialog.NORMAL_TYPE).setTitleText("提示").showCancelButton(true).setConfirmClickListener(new OnSweetClickListener() {
							
							@Override
							public void onClick(SweetAlertDialog sweetAlertDialog) {
								// TODO Auto-generated method stub
								Toast.makeText(MainActivity.this, "你好啊", 1).show();
								sweetAlertDialog.dismiss();
							}
						})
						.setContentText("您目前的收入尚未满足开启要求。加油...").show();
			}
		});
	}


}
